<%@ page language="java" contentType="text/html; charset=utf-8"   pageEncoding="utf-8"%>
<!DOCTYPE html>
	<script type="text/javascript" src="${ctxPath }/js/lib/jquery-1.12.4.min.js?20190117152252"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.32.0/codemirror.min.js"></script>
	<link rel="stylesheet" media="all" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.32.0/codemirror.css" />
	<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.32.0/addon/search/searchcursor.min.js"></script>
	<script src="${ctxPath }/js/lib/mergely/mergely.js" type="text/javascript"></script>
	<link rel="stylesheet" media="all" href="${ctxPath }/js/lib/mergely/mergely.css" />
	<meta charset="UTF-8">

	<div class="mergely-full-screen-8">
	  	<div class="mergely-resizer">
	    	<div id="mergely"></div>
	  	</div>
	</div>

<script>
$(document).ready(function () {
	// 不赋值
	//$('#mergely').mergely();
	// 同步赋值
	$('#mergely').mergely({
        lhs: function(setValue) { // Left-hand Side左边值
            setValue('the quick red fox\njumped over the hairy dog');
        },
        rhs: function(setValue) { // Right-hand Side右边值
            setValue('the quick brown fox\njumped over the lazy dog');
        }
    });
	// 异步设置值
	// get async lhsResponse, then set lhs value
    //$('#mergely').mergely('lhs', 'kevin');
	// 清除左边内容
    //$('#mergely').mergely('clear', 'lhs');
	// 获取内容
    //alert($('#mergely').mergely('get', 'rhs'));
});
</script>
